import sys
from PyQt5.QtWidgets import QApplication, QMainWindow, QPushButton, QGridLayout
from PyQt5.QtGui import QIcon

class firsManwin(QMainWindow):
    def __init__(self,parent=None):
        super(firsManwin,self).__init__(parent)

        #设置主窗口标题
        self.setWindowTitle('第一个主窗口应用')

        #设置主窗口尺寸
        self.resize(400,300)

        self.status=self.statusBar()
        self.status.showMessage('只存在5秒的消息',5000)

if __name__ == '__main__':
    app=QApplication(sys.argv)
    app.setWindowIcon(QIcon('./images/ico.ico'))
    ui_class=firsManwin()
    ui_class.show()
    sys.exit(app.exec_())